<!DOCTYPE html>
<html lang="en" class="app">
<head>  
<title>{$title_name}</title>
<meta name="description" content="商城, 分销, 平台, 多店铺商城, 单店铺商城, tp5.0" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<!--[if lt IE 9]> <script src="js/ie/html5shiv.js" cache="false"></script> <script src="js/ie/respond.min.js" cache="false"></script> <script src="js/ie/excanvas.js" cache="false"></script> <![endif]-->
<!-- <script src="PLATFORM_JS/app.v2.js"></script> -->
<script src="__STATIC__/js/jquery-1.8.1.min.js"></script>

<script src="__STATIC__/blue/bootstrap/js/bootstrap.js"></script>

<link href="__STATIC__/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- <link rel="stylesheet" href="PLATFORM_CSS/app.v2.css" type="text/css" /> -->
<link rel="stylesheet" href="PLATFORM_CSS/app.v1.css" type="text/css" />
<!-- <link rel="stylesheet" type="text/css" href="__STATIC__/blue/bootstrap/css/bootstrap.css" /> -->
<script src="PLATFORM_JS/wysiwyg/demo.js" cache="false"></script>
<script src="__STATIC__/js/common.js"></script>
{include file="platform/controlCommonVariable" }
<!-- 引入css js style等公共文件  start-->
{block name="resources"}{/block}
<!-- 引入css js 公共文件  end-->
<style>
input:-webkit-autofill {-webkit-box-shadow: 0 0 0px 1000px white inset !important;}
input.error{display:block;}
/*解决导航 靠边问题 */
.padder-v{padding-left: 15px;}
</style>
</head>

<body style="background:transparent;">
        <div style='position:fixed;top:0;left:0;width:100%;height:55px;z-index:1000000;    background-color: #373e50;'></div>
        <div style='position:fixed;width:220px;height:50px;left:30px;top:0;z-index:1000000;'>
	        <div style='display: table-cell;width:220px;height:55px;text-align:left;line-height:50px;vertical-align: middle !important;'>
	        <img src='PLATFORM_IMG/platform_logo.png' style='display: inline-block !important;vertical-align: middle !important;max-width: 100% !important;max-height: 100% !important;height: auto !important;width: auto !important;'>
	        </div>
        </div>
        <div style='position:fixed;top:55px;left:0;bottom:0;width:68px;background:#444;' id='back_ground'></div>
        <div style='position:fixed;top:55px;left:68px;bottom:0;width:152px;background:#fff;'></div>
        <section class="vbox">
        	<div class="left-sidebar" id="sidebar">
			<div id="first-sidebar" class="nav-primary first" >
				<ul class="nav nav-list">
				{volist name="nav_list" id="nav"}
					<li class="{if condition="$nav['data']['module_id'] eq $headid"} active{/if}" style="position: relative;text-align:center;margin:0;">
					<a href="{:__URL('PLATFORM_MAIN/'.$nav['data']['url'])}" onclick="show_menu({$nav['data']['module_id']})" style="">
					<i class="nav-icon {$nav['data']['icon_class']}"></i>
					<span style='display:inline-block;width:40px;text-align:left;font-size:12px;'>
					{$nav['data']['module_name']}
					</span>
					</a></li>
				{/volist}
				</ul></div>
				<div id="second-sidebar" class="nav-primary second">
				{volist name="nav_list" id="nav"}
					{notempty name="nav['sub_menu']"}
						
						<ul class="nav menu-nav {if condition="$nav['data']['module_id'] eq $headid"} block{else}hide{/if}" id="menu_{$nav['data']['module_id']}" >
						{volist name="nav['sub_menu']" id="nav_sub"}
						<li class="{if condition="$nav_sub['module_id'] eq $second_menu_id"} active{/if}" >
						{php}$check_action = strtoupper($action); $check_method = strtoupper($nav_sub['method']);{/php}
						<a href="{:__URL('PLATFORM_MAIN/'.$nav_sub['url'])}" class="{if condition="$check_action eq $check_method"} active{/if}">
						<span style="font-size:12px;">{$nav_sub['module_name']}</span></a></li>
						{/volist}
						</ul>
					{/notempty}
					
				{/volist}
				</div></div>
		{include file="platform/urlModel"}
		<section class="bg-dark dk top-sidebar" >
			<div class="navbar-header aside-md"style="z-index:5000;">
<!-- 				<a href="#"  data-toggle="fullscreen">-->
<!-- 				<img src="PLATFORM_IMG/logo1.png" class="m-r-sm"></a> -->
			</div>
			<ul class="nav navbar-nav navbar-right hidden-xs nav-user" style="position:fixed;top:0;right:0;z-index:1000001;">
				<li class="hidden-xs"> 
					<a href="{:__URL('SHOP_MAIN')}" title="新窗口打开商城首页" target="_black" class="dker"><i class="navtop-icon icon-home"></i></a>
				</li>
				<li class="hidden-xs"> 
					<a href="javascript:void(0);" onclick="delcache()" title="清除缓存" class="dker"><i class="navtop-icon icon-clear"></i></a>
				</li>
				<li class="hidden-xs"> 
				<a href="{:__URL('PLATFORM_MAIN/Login/logout')}" title="安全退出管理中心" class="dker"><i class="navtop-icon icon-power-off"></i></a>
				</li>
				<li class="dropdown">
				<a href="#" class="dropdown-toggle dker" data-toggle="dropdown"> 
				<span class="thumb-sm avatar pull-left">
						<img src="__STATIC__/images/default_user_portrait.gif">
				</span> {$username} <b class="caret"></b>
				</a>
					<ul class="dropdown-menu animated fadeInRight" style="z-index:5000;">
	<!-- 						<span class="arrow top"></span> -->
						<li><a onclick="editPasswordBox();">修改密码</a></li>
						<li><a href="{:__URL('SHOP_MAIN')}">商城首页</a></li>
						<li class="divider hide"></li>
					</ul>
				</li>
			</ul>
		</section>
		
		
		<div id="content" class="main">
					<section class="vbox"  style="min-width:1200px">
						<header class="header bg-white b-b b-light panel-title">
				            <p> <span>{$frist_menu.module_name}</span><!-- $niu_version  --> &gt;
								<a href="{:__URL('PLATFORM_MAIN/'.$secend_menu['url'])}">{$secend_menu.module_name}</a>
							</p>
				            <!-- 当前位置 -->
				        </header>
						<section class="scrollable wrapper" style="min-width:1200px">
	
						{notempty name="three_menu_list"}
							<div class="row panel-body" style="padding-top:0px;">
						{volist name="three_menu_list" id="vt"}
								<a href="{:__URL('PLATFORM_MAIN/'.$vt['url'])}" class="btn btn-sm {if condition="strtoupper($vt['method']) eq strtoupper($action)"}btn-primary{else /}btn-default{/if}">{$vt.module_name}</a>
						{/volist}
							</div>
						{/notempty}

						<!-- 操作提示  start -->
						{notempty name="tips"}
							<section class="panel-default m-b-sm">
								<div class="alert alert-info">
									<p>
					                  <button type="button" class="close"><i class="fa fa-minus"></i></button>
					                  <i class="fa fa-hand-o-right m-r-xs"></i><strong>操作提示</strong>
					                </p>
					                {foreach name="tips" item="vt"}
					                   <p class="alert-p m-l-xl"><i class="fa fa-caret-right m-r-xs"></i>{$vt}</p>
					                {/foreach}
				                </div>
							</section>
						{/notempty}
						<!-- 操作提示  end -->
							{block name="main"} {/block}
						</section>
					</section>
					<a href="#" class="hide nav-off-screen-block"
						data-toggle="class:nav-off-screen" data-target="#nav"></a>
				</div>
	</section>
	<!-- 公共的操作提示弹出框 common-success：成功，common-warning：警告，common-error：错误，-->
<div class="common-tip-message js-common-tip">
	<div class="inner"></div>
</div>
<!--修改密码弹出框 -->
<div class="modal fade" id="edit-password" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">修改密码</h4>
			</div>
			<div class="modal-body">
				<div class="control-group">
				<label class="control-label" for="pwd0" style="width: 160px;"><span class="color-red">*</span>原密码</label>
				<div class="controls" style="margin-left: 180px;">
					<input type="text" id="pwd0" placeholder="请输入原密码" class="input-common" />
					<span class="help-block"></span>
				</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="pwd1" style="width: 160px;"><span class="color-red">*</span>新密码</label>
					<div class="controls" style="margin-left: 180px;">
						<input type="text" id="pwd1" placeholder="请输入新密码" class="input-common" />
						<span class="help-block"></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="pwd2" style="width: 160px;"><span class="color-red">*</span>再次输入密码</label>
					<div class="controls" style="margin-left: 180px;">
						<input type="text" id="pwd2" placeholder="请输入确认密码" class="input-common" />
						<span class="help-block"></span>
					</div>
				</div>
				<div style="text-align: center; height: 20px;" id="show"></div>
			</div>
			<div class="modal-footer">
					<button type="button" class="btn btn-success" onclick="submitPassword();">提交</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal -->
</div>
<script>
var PLATFORMMAIN = 'PLATFORM_MAIN';
var UPLOAD = '__UPLOAD__';
</script>
<script type="text/javascript">

$(function(){
	img_lazyload();
})

//图片懒加载
function img_lazyload(){
	$("img.lazy_load").lazyload({
		threshold : 0,
		effect : "fadeIn", //淡入效果
		skip_invisible : false
	})
}


function tab_menu(id){
	if(id == 1){
		$(".nav1").hide();
		$(".nav2").show();
	}else if(id == 2){
		$(".nav1").show();
		$(".nav2").hide();
	}
}
$(".close").click(function(){
	$(this).children('i').toggleClass("fa-minus");
	$(this).children('i').toggleClass("fa-plus");
	$(this).parents('.alert').find(".alert-p").toggleClass("hide");
});
function show_menu(pid){
// 	$(".menu-nav").removeClass('block');
// 	$(".menu-nav").addClass('hide');
// 	$("#menu_"+pid).removeClass('hide');
// 	$("#menu_"+pid).addClass('block');
	var url = $("#menu_"+pid+" li").eq(0).find('a').attr('href');
	location.href = url;
}
//错误隐藏 onkeydowm事件 onchange事件
function error_hide(){
	$(".error").hide();
}

/**
 * 清理缓存
 */
function delcache() {
	$.ajax({
		url : __URL(PLATFORMMAIN+"/system/deletecache"),
		type : "post",
		data : {},
		dataType : "json",
		success : function(data) {
			if (data) {
				showMessage('success', '缓存更新成功');
			} else {
				showMessage('error', '更新失败，请检查文件权限');
			}
		}
	});
}

function editPasswordBox(){
	$("#edit-password").modal("show");
}



//保存修改密码的按钮
function submitPassword() {
	var pwd0 = $("#pwd0").val();
	var pwd1 = $("#pwd1").val();
	var pwd2 = $("#pwd2").val();
	if (pwd0 == '') {
		$("#pwd0").focus();
		$("#pwd0").siblings("span").html("原密码不能为空");
		return;
	} else {
		$("#pwd0").siblings("span").html("");
	}

	if (pwd1 == '') {
		$("#pwd1").focus();
		$("#pwd1").siblings("span").html("密码不能为空");
		return;
	} else if ($("#pwd1").val().length < 6) {
		$("#pwd1").focus();
		$("#pwd1").siblings("span").html("密码不能少于6位数");
		return;
	} else {
		$("#pwd1").siblings("span").html("");
	}
	if (pwd2 == '') {
		$("#pwd2").focus();
		$("#pwd2").siblings("span").html("密码不能为空");
		return;
	} else if ($("#pwd2").val().length < 6) {
		$("#pwd2").focus();
		$("#pwd2").siblings("span").html("密码不能少于6位数");
		return;
	} else {
		$("#pwd2").siblings("span").html("");
	}
	if (pwd1 != pwd2) {
		$("#pwd2").focus();
		$("#pwd2").siblings("span").html("两次密码输入不一样，请重新输入");
		return;
	}
	$.ajax({
		url : __URL(PLATFORMMAIN+"/login/modifypassword"),
		type : "post",
		data : {
			"old_pass" : $("#pwd0").val(),
			"new_pass" : $("#pwd1").val()
		},
		dataType : "json",
		success : function(data) {
			if (data['code'] > 0) {
				$("#show").html('<span style="color:green">密码修改成功</span>');
				location.reload();
			} else {
				$("#show").html( '<span style="color:red">' + data['message'] + '</span>');
			}
		}
	});
}



</script>
	<!-- Bootstrap -->
	<!-- App -->

	<script src="PLATFORM_JS/charts/easypiechart/jquery.easy-pie-chart.js"></script>
	<script src="PLATFORM_JS/charts/sparkline/jquery.sparkline.min.js"></script>
	<script src="PLATFORM_JS/charts/flot/jquery.flot.min.js"></script>
	<script src="PLATFORM_JS/charts/flot/jquery.flot.tooltip.min.js"></script>
	<script src="PLATFORM_JS/charts/flot/jquery.flot.resize.js"></script>
	<script src="PLATFORM_JS/charts/flot/jquery.flot.grow.js"></script>
	<script src="PLATFORM_JS/charts/flot/demo.js"></script>
	<script src="PLATFORM_JS/calendar/bootstrap_calendar.js"></script>
	<script src="PLATFORM_JS/calendar/demo.js"></script>
	<script src="PLATFORM_JS/sortable/jquery.sortable.js"></script>
	<script src="PLATFORM_JS/datatables/jquery.dataTables.min.js"
		cache="false"></script>
	<script src="PLATFORM_JS/nestable/jquery.nestable.js"></script>
	<script src="PLATFORM_JS/nestable/demo.js"></script>
	<script src="PLATFORM_JS/libs/underscore-min.js" cache="false"></script>
	<script src="PLATFORM_JS/fuelux/fuelux.js" cache="false"></script>
	<script src="PLATFORM_JS/fuelux/demo.datagrid.js" cache="false"></script>
	<!-- slider -->
	<script src="PLATFORM_JS/slider/bootstrap-slider.js" cache="true"></script>
	<!-- select2 -->
	<script src="PLATFORM_JS/select2/select2.min.js" cache="true"></script>

	<!-- markdown -->
	{block name="script"}{/block} 
	{include file="platform/openDialog" /}
	<script src="__STATIC__/js/ajax_file_upload.js" type="text/javascript"></script>
	<script src="__STATIC__/js/file_upload.js" type="text/javascript"></script>
	<script src="PLATFORM_JS/validation/jquery.validate.js" charset="utf-8" cache="false"></script>
	<script src="PLATFORM_JS/validation/messages_zh.js" charset="utf-8" cache="false"></script>
	<!-- wysiwyg -->
	<script src="PLATFORM_JS/wysiwyg/jquery.hotkeys.js" cache="false"></script>
	<script src="PLATFORM_JS/wysiwyg/bootstrap-wysiwyg.js" cache="false"></script>
	<script src="__STATIC__/js/jquery.lazyload.js"></script>
	<script src="PLATFORM_JS/wysiwyg/demo.js" cache="false"></script>
	
</body>
</html>